home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / include / dvtools.h < prev    next >
C/C++ Source or Header  |  1997-05-08  |  5KB  |  138 lines

  1. /*
  2.  
  3. SPECIAL VERSION!
  4.  
  5. |    file name - dvtools.h
  6. |===================================================================
  7. |
  8. |        copyright (c) 1986, V. I. Corporation
  9. |
  10. |       Scott Reed    Feb 17, 1986
  11. |    R. Kohler    Feb 21, 1986    Add new stuff
  12. |    Russell Turner  Feb 26, 1988    AXISDESC type
  13. |       Scott Reed    Feb 13, 1989    removed DS type defines
  14. |    K. Madison    Feb 01, 1990    Added Tproto types
  15. |
  16. |===================================================================
  17. */
  18.  
  19. #ifndef DVTOOLS_H
  20. #define DVTOOLS_H
  21.  
  22. /* -------------------------------------------------------------------- */
  23. #include "dstypes.h"
  24.  
  25. /* parameter definitions :                        */
  26.  
  27. #define NOCHANGE    -1  /* for attributes to remain unchanged*/
  28.  
  29. #define DSFAILMISSING    0   /* to fail when vars missing in master ds's*/
  30. #define DSADDMISSING    1   /* to add vars when missing in master ds's*/
  31. #define DS_EXACTMATCH    2   /* match ds's exactly when merging views */
  32. #define DS_SUBSETMATCH    3   /* one ds must be a subset of another ds */
  33.                 /* when merging views */
  34. #define DS_NAMEMATCH    4   /* only ds names must match when merging */
  35.                 /* views */
  36.  
  37. #define LOC_POLL    0   /* return valid location object in any event*/
  38. #define WAIT_PICK    1   /* block until selection (key or button)*/
  39. #define WAIT_CHANGE    2   /* block until cursor movement or key press*/
  40. #define PICK_POLL    3   /* does not block, returns location object*/
  41.                 /* only if there was a selection (key or*/
  42.                 /* button) else retuns NULL*/
  43.  
  44.  
  45. #define NAMED_SEARCH    0   /* search view for selection of named object*/
  46. #define FULL_SEARCH    1   /* search entire view for selected object*/
  47.  
  48. #define DSASCII        2   /* ascii file or process datasource*/
  49. #define DSBINARY    3   /* binary file or process datasource*/
  50.  
  51. /* -------------------------------------------------------------------- */
  52. /* Dataviews Private Type definitions:                    */
  53.  
  54. #if 0
  55. #define DRAWPORT    ADDRESS        /* dp    drawport */
  56. #define VIEW        ADDRESS        /* vi    view */
  57. #define DATASOURCELIST  ADDRESS        /* dl    data source list */
  58. #define DATASOURCE    ADDRESS        /* ds    data source */
  59. #define DSVAR        ADDRESS        /* dsv    data source variable */
  60. #define OBJECT        LONG        /* ob    object */
  61. #define INHANDLER    ADDRESS        /* ih    interaction handler */
  62. #else
  63. typedef ADDRESS    DRAWPORT;        /* dp    drawport */
  64. typedef ADDRESS        VIEW;        /* vi    view */
  65. typedef ADDRESS  DATASOURCELIST;        /* dl    data source list */
  66. typedef ADDRESS    DATASOURCE;        /* ds    data source */
  67. typedef ADDRESS        DSVAR;        /* dsv    data source variable */
  68. #ifndef VOSTD_H
  69. typedef LONG        OBJECT;        /* ob    object */
  70. #endif
  71. typedef ADDRESS    INHANDLER;        /* ih    interaction handler */
  72. #endif
  73.  
  74. /* Obsolete names for some private types */
  75. /* (see dvstd.h for more obsolete private data type names) */
  76.  
  77. #define LISTOFDSVARS    ADDRESS        /* same as DSVAR */
  78. #define DRAWING_OBJECT  OBJECT        /* same as OBJECT */
  79. #define SCREEN_OBJECT    OBJECT        /* same as OBJECT */
  80. #define LOCATION_OBJECT OBJECT        /* same as OBJECT */
  81. #define VARIABLE_DESCRIPTOR  ADDRESS    /* same as VARDESC */
  82. #define VIEWPORT_OBJECT    OBJECT        /* same as OBJECT */
  83.  
  84. /* -------------------------------------------------------------------- */
  85. /* globals set when opening, reading, closing datasources and */
  86. /* when reading datasource variables */
  87.  
  88. GLOBALREF DATASOURCE M_dscurrent;/* current datasource being opened,
  89.                     read or closed */
  90. GLOBALREF DSVAR M_dsvcurrent;    /* current datasource variable
  91.                     being read */
  92.  
  93. /* -------------------------------------------------------------------- */
  94. /* Information needed for running prototypes with Tproto routines.*/
  95. #define PROTO_ENV    ADDRESS      /* prototype environment */
  96. #define V_TPROTO_QUIT    -1        /* status from TprotoHandleInput */
  97. typedef struct _PROTO_INFO *PROTO_INFO_PTR;
  98.  
  99. /*
  100.   DRAWPORT_ATTRIBUTES typedef. Used by Tproto routines.
  101.   This structure contains the attribures of a drawport: its virtual
  102.   screen viewport (vvp), drawing's world viewport (wvp), and its
  103.   aspect ratio flag (strech_flag).
  104. */
  105.   typedef struct DRAWPORT_ATTRIBUTES
  106.     {
  107.     RECTANGLE *vvp;    /* where on the screen in virtual coords */
  108.     RECTANGLE *wvp;    /* portion of the view in world coords */
  109.     DV_BOOL stretch_flag; /* TRUE: TdpCreateStretch, FALSE: TdpCreate */
  110.     } DRAWPORT_ATTRIBUTES;
  111.  
  112. typedef ADDRESS (*TDRFOREACHNAMEDOBJFUNPTR) V_P_((OBJECT obj,
  113.                            char *name,
  114.                            ADDRESS argblock));
  115.  
  116. typedef ADDRESS (*TDPTRAVERSEFUNPTR) V_P_((DRAWPORT drawport,
  117.                        ADDRESS redraw_vp));
  118. typedef void (*TDPREFRESHFUNPTR) V_P_((DRAWPORT drprt, RECTANGLE *rect,
  119.                        ADDRESS args));
  120. typedef ADDRESS (*TDLFOREACHDSFUNPTR) V_P_((DATASOURCE ds,
  121.                         ADDRESS argblock));
  122. typedef ADDRESS (*TDLFOREACHDSVFUNPTR) V_P_((DATASOURCE ds,
  123.                          DSVAR dsv,
  124.                          ADDRESS argblock));
  125. typedef ADDRESS (*TDSFOREACHVARFUNPTR) V_P_((DSVAR dsv,
  126.                          ADDRESS argblock));
  127. typedef void (*TDSFREEFUNPTR) V_P_((ADDRESS data));
  128. typedef ADDRESS (*TDSVFOREACHVDPFUNPTR) V_P_((VARDESC vdp, ADDRESS argblock));
  129. typedef ADDRESS (*TDSVFOREACHREFFUNPTR) V_P_((VARDESC vdp, int type,
  130.                           ADDRESS argblock));
  131. typedef void (*TDSVFREEFUNPTR) V_P_((ADDRESS data));
  132. typedef ADDRESS (*TVIFOREACHDSFUNPTR) V_P_((DATASOURCE ds, ADDRESS argblock));
  133. typedef ADDRESS (*TVIFOREACHVARFUNPTR) V_P_((DATASOURCE ds, DSVAR dsv,
  134.                          ADDRESS argblock));
  135. typedef void (*VUDGTRVRSFUNPTR) V_P_((DATAGROUP dgp));
  136. typedef void (*VUVDTRVRSFUNPTR) V_P_((VARDESC vdp));
  137. #endif  /*DVTOOLS_H*/
  138.